/*
 * @Author: dingxiao
 * @Date: 2025-06-20 10:16:16
 * @Description: 新增按钮显示弹窗混入
 */
export default {
  data() {
    return {
      dialogVisible: false,
    };
  },
  watch: {
    visible: {
      handler(val) {
        val && this.show();
      },
      immediate: true,
    },
  },
  methods: {
    /**
     * 显示弹框
     */
    show() {
      this.dialogVisible = true;
    },
    /**
     * 隐藏弹框
     */
    hide() {
      this.dialogVisible = false;
      this.$emit('update:visible', false);
    },
  },
};
